﻿@model WD.Db.Contract.Rbac_FunctionModel
@{
    ViewBag.Title = "WD.Db.Contract.Model.Rbac_FunctionModel_Edit";
    Layout = "~/Views/Shared/_LayoutEdit.cshtml";
}
<style>
    select {
        height: 34px;
    }
</style>
<form id = "Rbac_FunctionModel_mainForm" action="@Url.Action("Edit", "Rbac_FunctionModel")" method="POST">

    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.ModelName, "功能名字", new { @class = "" })

        @Html.TextBoxFor(model => model.ModelName, new { @class = "form-control" })
    </div>

    <div class="form-group col-xs-6 form-group-select2">
        @Html.LabelFor(model => model.ParentID, "父级模块", new { @class = "" })
        @Html.DropDownListFor(model => model.ParentID, ViewBag.selectListFunModel as IEnumerable<SelectListItem>, "请选择父级功能", new { style = "width:100%" })
    </div>


    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Url, "连接地址", new { @class = "" })
        @Html.TextBoxFor(model => model.Url, new { @class = "form-control" })
    </div>


    <div class="form-group col-xs-6 form-group-select2">
        @Html.LabelFor(model => model.ModelLevel, "功能级别", new { @class = "" })
        @Html.DropDownListFor(model => model.ModelLevel, ViewBag.selectListGnJb as IEnumerable<SelectListItem>, "请选择功能级别", new { style = "width:100%" })
    </div>

    <div class="form-group col-xs-6">
        @Html.LabelFor(model => model.Sort, "排序", new { @class = "" })

        @Html.TextBoxFor(model => model.Sort, new { @class = "form-control" })
    </div>
    <div class="form-group col-xs-6 form-group-select2">
        @Html.LabelFor(model => model.ModelType, "功能类型", new { @class = "" })
        @Html.DropDownListFor(model => model.ModelType, ViewBag.selectListGnLx as IEnumerable<SelectListItem>, "请选择功能类型", new { style = "width:100%" })
    </div>

    <div class="form-group col-xs-12">
        @Html.LabelFor(model => model.Icon, "图标", new { @class = "" })

        @Html.TextBoxFor(model => model.Icon, new { @class = "form-control" })
    </div>

</form>
<div class="clearfix"></div>

<script>
    $('#ModelLevel', $("#Rbac_FunctionModel_mainForm")).select2();
    $('#ParentID', $("#Rbac_FunctionModel_mainForm")).select2();
    $('#ModelType', $("#Rbac_FunctionModel_mainForm")).select2();
    $('#ModelCat', $("#Rbac_FunctionModel_mainForm")).select2();

    function Rbac_FunctionModelCheckField() {
        //TODO 检查字段必填项 必须有返回值（成功TRUE,失败FALSE）

        return true;
    }

</script>

